some fixes in viewOrder