[Fix] debug mode behavior