fixed register keyboard bug