Changed safeExit