fix compatability on mac