Fixed escape-key related bug