Improved OS X support