Fixes some parts of the state feature.