Added possibility to set maximum number of selectable items