Added test cases for GitHub issues #662 and #739.
Merge pull request #743 from klickverbot/testcases

Added test cases for GitHub issues #662 and #739.