fix history bug