Fix the "removeSession" callbacks (see #5353)
Merge branch 'hotfix/3.0.6' into develop