Fixed a bug in the subtag resolving