Fixed addFn so that it stores providers using the fn.name key.