Feature/459 install script fix

Fixes for #459 and #527