fixing up so works on mac too