Cancel scanning when you try to close pragha.