lose a stronghold fight and you will lose buildings. this is not a bug, you will need to pay attention to those fights. i would recommend hiring as many high security people as you can. i dont know what the max for it is, maybe 8? also dont auto resolve unless you feel like making more buildings most the guards suck but again not a bug.....