fixes for mac build