Fixed undefined labels, removed debugger and added better node id guessing