fixed the len error