Fixed code which gave a syntax error when inserted in public/js/controllers/header.js