Fix method declaration bug