fix bug for dices undo_state