fix panic when a method is not found