fix register-serviceprovider bug