fixed a bug with variance filter.