ported [4031/branches/1.0], refs #999