Fixed some edge cases in Streams/image/preview.js