Small bug fix in sort ordering when selecting from a table object.