keyboard handler bug fixed