Fixed the endless adapter

Now only adds one space beyond the cached data, added a case if no data
can be loaded, and is more efficient.