Fixed a bug in keyboard controler.