Fix issue #1166.
Merge pull request #1174 from AnalyticalGraphicsInc/issue1166

Fix issue #1166.