fix printvisitor constructor