Fix wrong length check

len is the current character length... We need to check prefix string
length.