Threading issue with MacOSX 10.8. Should solve #298

Hi
This should solve #298 on MacOSX 10.8. I didn't tested 10.7/6 or iOS.

Cheers
Remo