fixing key code