some fixes in build system