fixed bug that gives incorrect tags.