Fixed persistance bugs