Fixed bugs with opening tabs. Reserved ID 0 for placeholder use.