PDIO-45 #comment Fix variable scope