Remade local thread dict logic