Fixed crash when selecting wrong menu items