Key listener bug fixed