Closing the main frame with escape.