fix(middleware): fix session middleware