Fix bug which caused notifications to appear for old messages.