Fix state issues.