Fix empty collapsed input

fixes #524
Merge pull request #536 from twosigma/sjs/fix-524

Fix empty collapsed input