correcty handle empty session-id