Some MacOS trickery