mei: use local cl variables in wd and amthif