Fixed issues when displaying messages