Fix issue with state comparison.