change savehistory() to use current instead of next view, ref #135