bug fix, session related, should be more careful about getting and
setting session