Fixed position index bug preventing position ids larger than number of rows in db table (no soft deletes. doh)