Fix #97 merge proposed fix, add test case.

All tests passing.