issue 62: fix a few bugs in setup.sh