fix bugs in install script