fix bugs in refresh_components, getResources