refactored local session to prevent exception being thrown when trying to resolve IstoreLocalMessages