fix some debug codes