more fixes for mac build