Torch + Small Database fix