fix init problem for nested sates