Fixed issues of textToFind not having correct value in before and between operations.