fix column sorting for different column types