fix keyup function