fixed the nav fix bug when resize