allow manager actions to properly close the session again (issue #5350)