A few changes that were needed for compatibilty with Mac OS X