fixed doctype parsing