Tweaked debugging code