fix out of sync primary key for torchbox images