fix to make it work on Mac OS