Fixed a bug in debug printing