Filter db gives already closed errors