Keep the loop to allow resizing more than once.