Fixed the calcNodeSurplus, i think...