Fixed history functionality