fix history problem bug