Fix a bootstrap menu spacing calculation which may crash the page