Proper fix of #resourcePathToFilename