fix random app builder 500 with bad url params

http://manage.dimagi.com/default.asp?92538
Merge pull request #2759 from dimagi/app-builder-limit

fix random app builder 500 with bad url params