Fix debug state check.