history filtering bug fix