core: Fix: return default when there is no session.