fixed save/restore bug for pointers in history files (thanks edw)