session fix, other fixes