fixed a bug in parsing partially formed tag names