fixed a bug with method body recognition