Archiving - one conversation devided to two

Hi, I have a little problem here. I use openfire 3.5.1 with monitoring services plugin. I have archiving turned on and I noticed strange behaviour. Sometimes one conversation is splited to two. In the first one there are only messages from X to Y and in the second one there are messages from Y to X.

I checked the database and messages are being stored with different ids. That appears to be the problem.