fixed stream error if getting image