fix bug in draw.py