fix unix vs mac compatibility