Fixed broken animation when the state does not change.