fixed autoClose and onSelect. Wrong types