various build errors fixed