Do more formatting in a message thread
Fix #161: fix crash after deleting header comment