Fix wrong initial length value