Fix #1177.
Changes per review.
Further review.
Merge pull request #1184 from AnalyticalGraphicsInc/issue1177

Fix #1177.