Small fixes for mac