For messages, which are received from outside BitcoinGUI, it was not working as it should.