Fixed bug with auto segment sizing based on maxPayloadSize