Fix some bugs in run_travis.sh