Added the previously undefined $_debug property, and wrapped a conditional in braces