fix history up/down bug (issue #1751)

2/2 history issue