Fix bug where protocol module was essentially unloaded upon an error