Back to dict -> stream to fix error