Fixed a bug of window and constant key.