Fix bugs in debug.php .