fixed bug in preorder % calculation