Fixed Table prioroity sort bug