fix allwordswith, some checks in replace