corrected a wrong variable assignment