Openfire sending message multiple times

We have implemented a one-to-one chat system via openfire, we have used the strophe plugin for the client.

We have following scenario.

User A talks to user B

User B browses on the website and disconnects on page unload and connects on page load.

After 5 or 6 pages user B starts to receive random earlier send messages.

Is this a bug or are we doing something wrong.

In attachment you can see an example of the response.