Fixed a minor bug when changing subjects code in simulation or live mode