Fixes bug that after duplicate entry error, there is always an duplicate...

... error although the data is correct