reapplied patch to resolve fatal error in cod_session_block_view()