Fixed any remaining threading issues
(probably)