Fix error in recursive method invokation