Adjustments to run on OSX 10.6