fix invalid memory address or nil pointer dereference when insert a filter in 'and', 'or' or 'not'