Fixed a bug: tab buttons are now cleared out before being regenerated.