Bugfix when doc is null
GrammarFix -> add ">" for fucking doctype