fix link code length check