Fixed a bug in debug output