Fix setting cookie