State counter is correct again. Fixes #226