refs #153 ported fix from gh71 branch