fix the load_resource method