more fixes for mac