fix parse error with undefined elements