fix debug check