fix tree entry sort order