Fixed the most common synchronization problem.

This is done by simply adding an offset if the buffer the message is
inserted to is larger than the one it was sent from (which means
something is out of sync). There are still synchronization problems.