fix viewpoint.js