restore state on duplicate search