fixed remaining debug code