Fixed a syntax error and added an integrity check to the nav menu function.