fixed a reason for an NPE in graphs