Fix work on Mac OS X