Thread timing fix