Edited debugging code