Fixed a reset states bug