dev environment executes terminateExit twice. Added work around