Fixed an issue with Swing KeyListner