fix issue where same state removed