Fix debug check