Nested states minor bugfixes