Fixed error in length