Fixed segmentation fault in Brain::State::change()