fix double-click
fix direct delete
merge code