Bug fix: Delete out of bounds because of updated indexes