Revert more of my earlier commit in order to fix #6