Core; shutdown at the start of the next frame instead of immediately, should avoid crashing when shutting down during update