Added fix for sorting on a column not in view