Some OS X fixes