Added some sorting cookie saving