Fixing column sorting issue