fix FilterInternal() to accept calls to grep and filter