misc build fixes