Fix crash when loading resource without a map