fix errors after Text 2.x modifications in case of distance only search