Work on #855; needs testing