fixes category sorting