Added default case for malformed requests
Seperated cancellation from termination.