fix viewer api