error fixes for filtering