Fixing error in CSRF handling

see #104