Made several fixes to the install script