#8 Fixed bugs with sessions, threads sync