Fix bug refs #6696