Fixed memory leak in rescale filter