unit tests fixes backported from 1.2 branch for issue #236
Updated change log.
Re-added some code that got overwritten in previous commit.