improved findNode algorithm and bugfix in vectorizeString