Some tweeking to fix bugs in tagging.