Feature/shell fix 118

Ready for review, all tests (that I can run) pass.