Fix broken usage of the history var in mag-menu-read-generic