Minor fixes to build script