fixes an issue when wrong order direction were set for sort columns