fixed bug in persistence