fix error unit test