Fix bugs in setup.sh