Prevent flickering in the main navigation.