Adds missing sortBy argument

Hi Carl, this should fix the ```sortNodes``` method. A custom ```sortBy``` method would not be used otherwise.