fix a bug in debug_tools