Fixing bug with non-simulation mode.