fix refactor encodelength test