history range bug fixed.