Views fixes

Some fixes after the recent views refactoring.