Fix for keyup issue