fix for endpoint stop procedure