fixed bug: history too long(bigger than 10)