added fixes to method generation