views: fix a bug in the view refactor