Fixed bugs in input for game