empty the mainview before rendering to prevent double search box when using the back button