Fix: remove deprecated $db object