fix tab problem and add init tab