fix ensureViews method