Fixed tpl file and missing div end tag