Fix detection of state parameters.