fix debug mode always enabled