Fix a bug - Boxfilter must pick the average value.