Fixed region index not being incremented.
Tagging function implemented.