fixed issues with image previews