fixed js error for nav