fix views and templates