Add try and catch so it doesn't crash when selecting a non existing item