gracefully stops