fix the debug mode