fix a bug that couldn't find `debug` function