Fixed some sidenav  and template bugs