Moved stop code to provider.