fix a small bug with gamepad