fixed uninitialized min and max lengths