Properly track states.