fix bug in convert.py