Fixes to doinstall script