Fix bug where back breaks the map
implement functional menu