Resolve issue about a undefined session index