- fix distinct issue
- don't try to actually insert / update if there are errors
Merge pull request #229 from will123195/3.0

- fix distinct issue