fixed some references to sessionManager, added forEachAsync for some parts