Fixing some build errors related to return types from undefined methods