fixing an issue where the image thumbnail wasn't displayed properly