Fixed bug in building a cookie string from an array