fix when not given 'onSelected' function