Duplicate rows in ofMessageArchive table

Hello. I’m using openfire 4.5.1 and monitoring service plugin 2.0.0. I’ve noticed, that some messages are stored twice in the ofMessageArchive table. I think this happens in the following case:

  1. We send a message to a user and he doesn’t recieve it because he is offline
  2. In 00:00 of the next day the message is duplicated in the ofMessageArchive table (maybe openfire resent it?)
  3. User receives both copies of the message, the first has original send time and the second has 00:00

What could i do to prevent duplicates? Thank you.