Case bug fixed on template view