Fixed not clearing history bug