limit history box size