Revised the mechanism to display notification messages.