Fixed bug in filter