To test on osx

I tested this on OSX, and it seems to be OK. merging.