Exit nicely after last record