Fix retrieving of SessionID to use listeners