Fixed scope of 'load_new_resource_state'