Shouldn't `$prefix` be `$prefixlength` here?