bug fixes for corectly displaying the messages