joystick: fixed some bugs