fix scan doctype bug