Fix a bug on OS X 10.5.8