Fixed a bug with clearChain test.