LRDOCS-1092 Using wrong variable. Also renamed the var