Proposed correct fix and unit tests for issue #169