fixed new bug in resetting states