some fixes
converts types template
fixes