Fix unstoppable API server