small fixes to engines.py