Fixed problem with bulk export failing

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