Fixed crash when pressing esc in settings menu.