Fix ThreadDB