fixed a bug in plate tagging