Fixed compatibility with Mac OS X