remove useless fragments