Fixed bugs in install script