Minor fixes to build scripts and procedure