fix viewer template