csrf error correction