onSessionTerminated method