fixed a little bug, added persistency tests