CIRCLEQ patch submitted by Jay Pfeifer