fix bug judge length