debug mode fix