Fixes issue #591

Make sure that we only pass a string to the set cookie function.