compatibility fix for Mac