fixed sorting for topics