fix up and down history bug