Fixed history overflowing