Corrected to work when loading resources from file://