Improved applying of filter