Fixed session bug after merge