fix for mac. probably breaks windows.