Fix bug in displaying message and add comment.