fix duplicated entries after backspace.