remove useless resources