Fixed install script bugs