Fixed the keyboard bug