Fix response and cookie errors