Bug fixing. Brain now switches correctly to phase 2.