Fixes for mac.