fix base defense error

and clean up defenses when we're done.