Fixed history bug