Generics generation fix on methods