Fixes to console.py.