fix rendering of main view