Fix bug in method declaration