Fix flickering of the nav bar