fixing update_record duplication error