fix deletesamples and resetdatetimes.