Fix the length bug.