prevent crash if no nodes