Help with logic in saving tables

I think it does save the first but not the last?