build scripts fixes