Fix keyup event handler