Fixed bug with length.