updated the touch ended so it respects the selected item settings