Changes to work with Mac OS X