Fix shutdown error.