bugfixes prior to refactor of my-sh