tab counter fixes