Allow empty state.
Fix some more issues with states.