Bug fix for debug printing