Fix threads not having index in place for mapping