Another attempt at solving stupid threading issues.