Fix where number of elements is defined by first line