Fix some bugs in the installers

Just some simple bash logic bugs.