fix substory deletion. closes #328