Fix state tracking again.