Mac OS X fixes