Fixes for Mac version