fixing flip, upgrading tmpl