fixed bug that caused error if no data available for temporal resampling