Fixed debug_mode