fixed filtering problem