corrects the type to be downloaded based on the actual resource