Made the mesh stop when choosing exit from the menu.