Fixed $self->defdb logic