fix session injection when the path is null.