Fix issue in handeling special keys