Fix errors in convert.py.