Horribly untested improvement for #555 which I will test momentarily.