Correctly handle empty output, fixes #4