Fixes 500 error on bulk add file to sets

Fixes #939