fix bug in undoViewHistory #135