ficing bugs on template view