fixed database variable in base.py