Minor fixes getting length.