Fix bug where if navigation does not contain the required link then an error was thrown