bug fix for problem with history