Fix errors in view files