For issue #82: Slow tab switching