fixed bug when messages are nested on 2+ levels