changed protocol to return on error but not terminate early on correct packets