Fixing unnecessary printing