fixed: must consider the returned type when generating proxy methods