Change sendresources to be more efficient.