Fix copying of resources