Attempt to fix script exit status reporting