Fixed bugs in debug interface