Fixes #1136. Fixes 1135.
Merge pull request #1160 from mdogan/fix/3.2/issue-1136

Fixes #1136. Fixes 1135.