Bugfixes in the main pinstall.sh