fixed some vars in template