Fixes state/deleteState feature.