Fix export history bug