fixed a bug on filter