Fixing threading, which 68d0ae5 broke to some extent.