Fix template div nesting.