fixed territory.h and territory.c errors