fix layout() to put in only the number of *requested* vector elements