fixes to preorder step counting