MIRTH-3362: Fixed bug that caused exporting messages from the CLI to fail.