handle reaching end of all

I doubt this will happen, but just in case.