Minor bug fixes for time resampling function