Fix segfaults in history manual test