fixed node sorting

closes #71