fixed lengthCheck error