session check was wrongly hooked