Fixes for Mac