fixed views with new database schema