Make sure the close/delete order is honored on application close