Finally works on mac