Fix in state history and logging format