avoid eternal loop on end of list