fix crash when no long detail screen is configured

fixes: http://manage.dimagi.com/default.asp?49784