bug fix in persistence.sync lines 141, 184, 185