fixed filtering bug