fixed small length bug