Fix the update and create duplicate check bug.