Removed more integer conversions for length.