BackendSession: fix IllegalStateException