Call stop before the onCompletion callback

Closes #2268