fix 500 for weird form ids

http://manage.dimagi.com/default.asp?102926