fixed remaining QI logic in simulation