Updates to fix variable not set errors.