Work on #916; needs testing