Minor fixes in base.py