some tweaks to building and primitive batch