fixed the error with uncle nodes, runs perfectly now