fix: encode fail when the sequence is blank