Fixed multithreading issues... hopefully once and for all.
I'll take out the ERRORCHECK once we know it's fixed.
Authored by: ace123 2007-09-25
Parent: [r11607]
Child: [r11609]