Made option "closeOnSelect" work.