Fix protocol errors catching.