fixed error that happens rebuilding defenses