Fix allSelected but on event and adds tests