Various Mac fixes.