Fix list sorting