Fixes for mac