territory management bugfixes