Incorrect variable

#6626 cc @claudiosmweb