fix OSX bug