fixed the wrong handling of duplicate serialNumbers in common dao