Merge pull request #1727 from sjinks/1.2.5

[1.2.5] Test case for #1683 + bug fixes