user upload 500 fix + small improvement
Merge pull request #775 from dimagi/user-upload

user upload 500 fix + small improvement