MacOS X fixes