history bug fixed.
improve test case