fix bug in nightly.sh