Fix navbar state problem