Modified for mac build