Correcting var issue