Mac cherry

A couple important mac changes cherry picked for Stuart.