Solved the bug: always starting with 0 when adding the new objects.