Fix for crash when sending too large a response packet, less efficient but should handle every packet type now.  Can retool if allocations end up being a problem.