fix double pop up issue when there are messages to display