added persisted messages object and fixed a problem that was causing a test case fail