fixed null ptr on missing imported grammar.