Handle simulation exits better.