Fixed bug when saving node with id 0

if statement evaluated false for first node ever saved since it has ID 0