Made debug code nicer