fixed build script termination