Fixing bug in debugging output