Minor fix to core.py