Fixing #2913

- [x] Added failing test case from #2913
- [x] Fix `done`
- [x] Fix `fail`