More info on it, whenever you make a research that modifies a unit's hps positively, the units on the field's hps are bumped up by the research, but any new units created won't be effected (their max hps will be but not current) as well this happens with buildings. Lets say your building originally has 1000 hps, and then +500 for an upgrade, when the building is constructed, it will gain hps all the way up to 1500, then it will be complete. Once it completes, the hps drop to 1000/1500, then the workers begin to repair the building back to full health. Is this a game glitch or maybe I'm not doing something proper while modifying the codes, let me know.