Work on #1393; needs testing