OS X 10.6 compability fixes