[bugfixes] added checks for session info data integrity
ref #1894 [added thread switching]