EndExit bugfixes