Bug fix : nested states