fix modhash nullreferenceexception and clean up parsed errors