fix handling of tabs