fixes for Mac