build fix and tweaks