Implementing brstgt's endless loop problem

Fix endless loop if adapter is set and has less items than previous
adapter