remove useless blocks