Bug fix in form.py