bug in end_row