Bugfixes for install script and generalization