Improve Fixes #1673: clear all states