fix debug code