more fixes to build scripts. issue #2