Fix bug in time sampling.
Merge remote-tracking branch 'origin/master'