Fix graceful shutdown by passing shutdown continuously