fixed #38 for OSX