Minor mac fixes (untested)