table/xtable sorting logic changed!!!