fixed bugs if set cookies by array of cookies