Fix stop procedure