Prevent 500 on OPM HSR export

http://manage.dimagi.com/default.asp?149389
@sreddy FYI