Incorporate @connor fix into new code. ref #94