Fix leak window bug and improve navigation view