Merge "Fix AssertionError int StateManager"