Merge pull request #1 from caicaiking/caicaiking-patch-1

avoid a copy operation when insert repeat events