BugFix: Can not generate methods correctly.