fixed bug with history api, tree width changeable by buttons, closes #40