improved generation of issue: avoid some nullpointer exceptions