Changed debug code