Fix for bug mixing thumbnail with jpeg image