Fixed various bugs with tabboxes and tree consistency