Fixes for mac env