fix debug mode