Fix `dpa` on Linux
fix history up/down bug (issue #1751)