History logging fixed