Fix singleton pattern for views.