cookie values sortable; fix bugs