applied comments and fix bug when tagging msgs already tagged