some fixes to the build system