Fix parsing abnormal quo header; speed up parsing

closes #1 (pull request)