fixed bug with in memory filtering