Fix : wrong variable scope