fix some debug code