before modifying tabs