Modify LoadResource() implementation