Feature/nextidbug

Tested against local data store.