Resolved issue with messages terminating at arbitrary lengths.