fixing exit code on script load