Fixed some bugs in the new install script