Fixed keypressed & keyreleased errors