Fixed MainActivity's onPause issue that would not display the messages properly.