fix the debug codes