Fix session scoping bug.