Mostly fixed chat wrap around issue.

It could be fixed better.