Fixed crash when closing a screen directly from a bar button action.