bug in recent fix for list sorting