Fix state comparison (impacted 32-bit)