fix some bugs in the brain guard.