Fixed debug output relying on there being a global 'game' object.