fix debug switch