fixed error in all preorder calc