Re-Fixed debugging code