fix substring equality