fix lots of auto-install.sh bugs