redo changes from Issue 2668
[2698]adminSessions: NPE

fixes #2698