Fix compile errors
Graceful shutdown is broken again