Fix: variable twice defined and remove useless variable