[core] updated some session related code;