Test case for #1501
Fix #1501
Merge pull request #1503 from sjinks/issue-1501

Fix #1501