fix session
because the param of strcmp() can't be NULL