Fixed crashes under OS X 10.6.x

Thx Ralf