fix document template view