fix average filter