fixed mixed-state bug