Don't set the isStopped state until after onStop hooks run.

- Fixes #481.