tabs and template fixes