Key Event Bug fix