review/commit Peter Creath's bugfix patch 1