Fix method declaration and variable use