fix bug and remove useless