various build fixes