Correcting a method invocation