Minor improvements to sample timing.