fixes layout of messages in chat window