correct bug on length field