Moved row selection to call after all rows are added