Fixed assert check in Cache and Resample module