sync before resetting data