Some fixes after view refactoring.