fix history export (bug #338)